home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12747 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: news.uiowa.edu!usenet
  2. From: Artur Wojdat <awojdat@lava.weeg.uiowa.edu>
  3. Newsgroups: comp.lang.c,comp.unix.programmer
  4. Subject: Q: '\n' character
  5. Date: Tue, 02 Apr 1996 10:18:11 -0800
  6. Organization: University of Iowa, Iowa City, IA, USA
  7. Distribution: world
  8. Message-ID: <31616F63.481D@lava.weeg.uiowa.edu>
  9. NNTP-Posting-Host: 128.255.149.126
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Win16; I)
  14.  
  15. Hello everybody,
  16.     Is there a function or some sort of way that I could remove '\n' 
  17. charecter form the end of the string. I'm reading from two files, want to 
  18. form one line of text and then have it printed out to stdout. I use fgets to 
  19. read from the file and I noticed that it appends newline char at the end.
  20.     It is important that two lines of text, one from each file, will be 
  21. combined into one and I can't do it because the first string has '\n' added 
  22. to it. I'm picky becauuse the output will be used to feed another program and 
  23. I'm affraid that not properly formatted input may corrupt the process.
  24.     Any suggestions will be greatly appreciated .. Thanks, Art ...
  25.